import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28779
 * Date: 2023-10-20
 * Time: 20:23
 */
public class Demo3 {
    public static void main(String[] args) throws InterruptedException {
        File file = new File("./text.txt");

        //file.delete();

        Thread.sleep(5000);
        file.deleteOnExit();
    }
}
